package com.thread;

/**
 * @author :admin
 * @description: 实现Runnable接口创建线程
 * @create date: 2019/4/3 10:50
 */
public class ThreadDemoCreate1 implements Runnable {

    public static void main(String[] args) {
        Thread thread = new Thread(new ThreadDemoCreate1(), "ThreadA1");
        Thread thread2 = new Thread(new ThreadDemoCreate1(), "ThreadA2");
        thread.start();
        thread2.start();
    }

    @Override
    public void run() {
        System.out.println("current thread run name :" + Thread.currentThread().getName());
    }
}
